{% block sw_single_select_base_results_list_result %}
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #result-item="{ item, index }">
    <slot
        name="result-group"
        v-bind="{ shouldShowGroupTitle, item, index, getGroupLabel, getGroupClasses }"
    >
        <li
            v-if="shouldShowGroupTitle(item, index)"
            :class="getGroupClasses(item)"
            @click.stop
        >
            {{ getGroupLabel(item) }}
        </li>
    </slot>
    <slot
        name="result-item"
        v-bind="{ item, index, labelProperty, searchTerm, highlightSearchTerm, isSelected, setValue, getKey }"
    >
        <sw-select-result
            :disabled="item.disabled"
            :class="'sw-select-option--' + item.value"
            :selected="isSelected(item)"
            v-bind="{ item, index }"
            @item-select="setValue"
        >
            {% block sw_single_select_base_results_list_result_label %}
            <slot
                name="result-label-property"
                v-bind="{ item, index, labelProperty, valueProperty, searchTerm, highlightSearchTerm, getKey }"
            >
                <sw-highlight-text
                    v-if="highlightSearchTerm && !isSelected(item)"
                    :text="getKey(item, labelProperty)"
                    :search-term="searchTerm"
                />
                <template v-else>
                    {{ getKey(item, labelProperty) }}
                </template>
            </slot>
            {% endblock %}
        </sw-select-result>
    </slot>
</template>
{% endblock %}
